Skip to content

fleet-kv: add identity-scoped SQLite core - #13362

Merged
dezren39 merged 3 commits into
mainfrom
lane-code-j/13314-kv-core
Nov 23, 2026
Merged

dezren39 merged 3 commits into
mainfrom
lane-code-j/13314-kv-core

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add the fleet-kv crate with host-local SQLite WAL storage, keyed by the complete owner/context/partition/namespace/key identity tuple.
  • Implement validated local set and get, including typed malformed-key and malformed-namespace errors.
  • Drop invalid equality derives from KvError; rusqlite::Error does not implement PartialEq or Eq.
  • Add identity-isolation, validation, and reopen-persistence tests.

This is a first vertical slice for #13314, not completion of Phase 1. Tombstones, outbox, CLI verbs, namespace registry/grants, oversized working-file storage, crash-recovery coverage, and backup/restore remain follow-up work.

Verification

  • cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-kv passed on commit c43ce08d94d: 4 passed, 0 failed, 0 ignored; Fleet run 45197429113, dispatched through Fleet on the fleet-forks GitHub Actions surface.
  • The first run found invalid PartialEq/Eq derives on KvError; commit c43ce08d94d removed them, and the follow-up run passed.
  • rustfmt --edition 2024 was run on the new crate source.

Refs #13314

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T14:18:04Z",
    "session_id": "ses_e5df7940f74ffeaXVm24eTgzGN",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/fleet/code-j-13314-20261123T135510Z-91c4d249",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/fleet/code-j-13314-20261123T135510Z-91c4d249",
      "repo": "developing-today/code",
      "branch": "lane-code-j/13314-kv-core",
      "sha": "9f6c17bdd9980e37e9a1589b2ffa49f74188f528"
    },
    "auth_subject": "agent-next-19-local",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec2af890-c70a-4425-88ea-d3976af51188
Commits

Reviewing files that changed from the base of the PR and between 4ca7ab4 and f6580c5.

Files ignored due to path filters: 1

  • pkgs/fleet/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 3

  • pkgs/fleet/Cargo.toml
  • pkgs/fleet/crates/fleet-kv/Cargo.toml
  • pkgs/fleet/crates/fleet-kv/src/lib.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T15:59:10.827102Z f6580c5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f6c17bdd9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +189 to +190
#[test]
fn malformed_keys_are_typed_refusals() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Property-test the key and namespace grammars

The new validators enforce grammar and byte-length invariants, but validation coverage consists of four hand-written key examples and no namespace tests; the existing property test generates only identity coordinates. The repository testing doctrine explicitly requires property coverage for parser invariants, so these examples do not satisfy that contract. Add generated valid/invalid keys and namespaces checked against an independent grammar oracle, including printable-ASCII characters and length boundaries.

AGENTS.md reference: AGENTS.md:L37-L39

Useful? React with 👍 / 👎.

Comment thread pkgs/fleet/crates/fleet-kv/src/lib.rs Outdated
|| !key.is_ascii()
|| key
.split('/')
.any(|segment| segment.is_empty() || !segment.bytes().all(|b| b.is_ascii_graphic()))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept printable ASCII spaces in keys

For a key containing a space, such as notes/meeting agenda, both set and get return MalformedKey because is_ascii_graphic() excludes ASCII space. The fleet-KV design’s “Key syntax and limits” contract (doc/2026-11-23T12-45-00Z_design_fleet_kv/2026-11-23T12-45-00Z_design_fleet_kv.md:85) permits printable ASCII, which includes spaces. Allow the full printable range while retaining the separate slash-segment checks so valid keys remain addressable.

Useful? React with 👍 / 👎.

dezren39 and others added 2 commits November 23, 2026 08:41
…de-08)

- P2: accept printable ASCII spaces in keys per the design's
  'Key syntax and limits' contract (is_ascii_graphic wrongly
  excluded 0x20); add space-key round-trip regression test.
- P1: add generated key/namespace grammar tests checked against
  independent oracles, plus length/grammar boundary unit tests.

Refs #13314. Queue task 21319.
@dezren39
dezren39 merged commit 375b974 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-code-j/13314-kv-core branch November 23, 2026 20:16
@dezren39 dezren39 added the audit:partial PR partially implemented; gap filed label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant